import java.util.Set;
import java.util.TreeSet;


public class Test {

		public static void main(String[] args) {
                MySet set = new MySet();
                Set p = new TreeSet();
                for (int i=0; i<50; i++)
                      p.add(	i);
                System.out.println("Add NULL shoud be false\t" +set.add(null));
                System.out.println("Add 1 shoud be true\t" +set.add(1));
                System.out.println("Add 1 should be false\t" +set.add(1));
                System.out.println("Add 2 should be true\t"+set.add(2));
                System.out.println("addAll from 0 to 49 (true)\t"+set.addAll(p));
                show(set);
                System.out.println("Contains 64? should be false\t"+set.contains(64));
                System.out.println("ContainsAll 0-49 (true) \t"+set.containsAll(p));
                System.out.println("Add 64 should be true \t\t"+set.add(64));
                System.out.println("Contains 64? should be true\t"+set.contains(64));
                System.out.println("Remove 0-49 should be true\t" + set.removeAll(p));
                show(set);
                System.out.println("Size? (1)\t" + set.size());
                System.out.println("IsEmpty? (no)\t" +set.isEmpty());
                System.out.println("Now Remove ALL!");
                set.clear();
                System.out.println("IsEmpty? (yes)\t" +set.isEmpty());
        }
        public static void show(Set s){
                Object[] ar = s.toArray();
                System.out.print("[ ");
                for (int i=0; i<ar.length; i++)
                        System.out.print (ar[i] + " ");
                System.out.println("]");
        }
}